<template>
  <div class="edit-helper">
    <div class="icon-wrapper" @click="toShowHelper">
      <div class="helper-icon">
        <img src="@/assets/image/common/question-circle.png" alt="" />
        <p>帮助</p>
      </div>
    </div>

    <div class="helper-wrapper" v-if="showHelper">
      <header class="header">
        <span>操作说明</span>
        <i class="el-icon-close" @click="showHelper = false"></i>
      </header>
      <main class="main">
        <div class="row">
          <span class="label">异常处理</span>
          <!-- <span>鼠标移入标黄或者标红的单元格显示异常原因 </span> -->
          <span>鼠标双击标黄或者标红的单元格进行编辑</span>
        </div>
        <div class="row shortcuts">
          <span class="label">快捷键</span>
          <ul>
            <li>
              <span class="title">复制</span>
              <span class="content">
                <i class="keyboard-btn">Ctrl</i> +
                <i class="keyboard-btn">C</i>
              </span>
            </li>
            <li>
              <span class="title">粘贴</span>
              <span class="content"
                ><i class="keyboard-btn">Ctrl</i> +
                <i class="keyboard-btn">V</i></span
              >
            </li>
            <li>
              <span class="title">撤销</span>
              <span class="content"
                ><i class="keyboard-btn">Ctrl</i> +
                <i class="keyboard-btn">Z</i></span
              >
            </li>
            <li>
              <span class="title">清空单元格</span>
              <span class="content"><i class="keyboard-btn">Delete</i></span>
            </li>
          </ul>
        </div>

        <div class="row range">
          <span class="label">范围选择</span>
          <ul>
            <li>
              <span class="title">选中一行</span>
              <span class="content">点击首列的指定行</span>
            </li>
            <li>
              <span class="title">选中一列</span>
              <span class="content">点击首行的指定列</span>
            </li>
            <li>
              <span class="title">选中指定行列 </span>
              <span class="content">按住鼠标左键拖动</span>
            </li>
          </ul>
        </div>
      </main>
    </div>
  </div>
</template>
<script>
export default {
  name: '',
  components: {},
  data() {
    return {
      showHelper: false,
    };
  },
  computed: {},
  mounted() {},
  methods: {
    toShowHelper() {
      this.showHelper = true;
    },
  },
};
</script>
<style lang="less" scoped>
.edit-helper {
  font-size: 14px;
  .icon-wrapper {
    position: fixed;
    right: 50px;
    bottom: 200px;
    z-index: 999;

    .helper-icon {
      width: 64px;
      height: 64px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;

      text-align: center;
      color: #262626;
      border: 1px solid #a3cdff;
      border-radius: 8px;
      background-color: rgba(236, 244, 255, 0.9);
      box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.06);
      img {
        width: 32px;
        margin-bottom: 2px;
      }
    }
  }

  .helper-wrapper {
    position: fixed;
    right: 50px;
    bottom: 100px;
    z-index: 999;

    box-sizing: border-box;
    width: 390px;
    height: 600px;
    background-color: #fff;
    box-shadow: rgba(0, 0, 0, 0.33) 0px 0px 7px 3px;
    z-index: 10000;

    .header {
      padding: 0 20px;
      height: 40px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      color: #666;
      background-color: #edeef0;
      i {
        cursor: pointer;
      }
    }
    .main {
      padding: 10px 20px;
      text-align: left;
      color: #333;
      .row {
        margin-bottom: 24px;
        .label {
          display: block;
          font-weight: bold;
          margin-bottom: 6px;
        }
      }

      li {
        height: 38px;
        padding: 0 15px;
        display: flex;
        align-items: center;
        border-bottom: 1px solid #e8e8e8;
        .title {
          width: 140px;
        }
        .keyboard-btn {
          height: 24px;
          line-height: 24px;
          padding: 0 12px;
          font-style: normal;
          background-color: #f3f5f5;
          border-radius: 4px;
        }
      }
    }
  }
}
</style>
